<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>promise</title>
</head>
<body>
	<div>fdf</div>
	<script type="text/javascript">
		const ninja=new Promise((resolve,reject)=>{
			resolve('latmy');
			//reject('an error occur')
		});
		ninja.then(lay=>{
			console.log(lay);
		},err=>{
			fail('there error')
		});
		







			
	</script>
</body>
</html>